package com.hzc.gulimall.product.vo;

import com.hzc.gulimall.product.entity.SkuImagesEntity;
import com.hzc.gulimall.product.entity.SkuInfoEntity;
import com.hzc.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
public class SkuItemVo {
    //1、sku基本信息获取  pms_sku_info
    SkuInfoEntity info;
    //2、sku图片信息  pms_sku_images
    List<SkuImagesEntity> images;
    //3、获取spu销售属性组合
    List<SkuItemSaleAttrVo> saleAttr;
    //4、获取spu介绍
    SpuInfoDescEntity desp;
    //5、获取spu规格参数信息
    List<SpuItemAttrGroupVo> groupAttrs;

    //秒杀信息
    SeckillInfoVo seckillInfoVo;
    Boolean hasStock = true;

    @Data
    public static class SkuItemSaleAttrVo {
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }

    @Data
    public static class SpuItemAttrGroupVo {
        private String groupName;
        List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo {
        private String attrName;
        private String attrValue;
    }

    @Data
    public static class AttrValueWithSkuIdVo {
        private String attrValue;
        private String skuIds;
    }
}
